import Vue from 'vue';
import App from './app.vue';

//组件库 & 样式 & 图标库
import 'bootstrap';
import { BootstrapVue, IconsPlugin } from 'bootstrap-vue';
//图标
import { addIcons } from './icons';
import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome';
//aos动画
import AOS from 'aos';
import 'aos/dist/aos.css';
//项目样式
import './styles/styles.scss';

//路由
import router from './router';

//vuex
import store from './store';

//vue-meta
import VueMeta from 'vue-meta';

addIcons();

Vue.component('font-awesome-icon', FontAwesomeIcon);

Vue.use(BootstrapVue);
Vue.use(IconsPlugin);

Vue.config.productionTip = false;

Vue.use(VueMeta);

//路由跳转后, 页面回到顶部
router.afterEach(() => {
    window.scrollTo(0, 0);
});

new Vue({
    created() {
        AOS.init({
            disable: 'mobile',
            duration: 600,
            once: true,
        });
    },
    router,
    store,
    render: h => h(App),
}).$mount('#app');
